package com.ruoyi.crm.service;

import java.io.UnsupportedEncodingException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.crm.domain.CrmCustomer;
import com.ruoyi.crm.domain.dto.CrmCustomerTraceDTO;
import com.taobao.api.ApiException;

/**
 * 客户列Service接口
 *
 * @author yanwenliang
 * @date 2024-10-18
 */
public interface ICrmCustomerService extends IService<CrmCustomer>
{
    /**
     * 查询客户列
     *
     * @param customerId 客户列主键
     * @return 客户列
     */
    public CrmCustomer selectCrmCustomerByCustomerId(String customerId);

    /**
     * 查询客户列列表
     *
     * @param crmCustomer 客户列
     * @return 客户列集合
     */
    public List<CrmCustomer> selectCrmCustomerList(CrmCustomer crmCustomer);

    /**
     * 新增客户列
     *
     * @param crmCustomer 客户列
     * @return 结果
     */
    public int insertCrmCustomer(CrmCustomer crmCustomer) throws UnsupportedEncodingException, NoSuchAlgorithmException, InvalidKeyException, ApiException;

    /**
     * 修改客户列
     *
     * @param crmCustomer 客户列
     * @return 结果
     */
    public int updateCrmCustomer(CrmCustomer crmCustomer);

    /**
     * 批量删除客户列
     *
     * @param customerIds 需要删除的客户列主键集合
     * @return 结果
     */
    public int deleteCrmCustomerByCustomerIds(String[] customerIds);

    /**
     * 删除客户列信息
     *
     * @param customerId 客户列主键
     * @return 结果
     */
    public int deleteCrmCustomerByCustomerId(String customerId);

    /**
     * 查询核心客户列列表
     * @param crmCustomer
     * @return
     */
    List<CrmCustomer> getMyCustomerList(CrmCustomer crmCustomer);

    /**
     * 查询选择的核心客户列列表
     * @param crmCustomer
     * @return
     */
    List<CrmCustomer> getChooseCustomerList(CrmCustomer crmCustomer);

    /**
     * 选择核心客户
     * @param crmCustomer
     * @return
     */
    int chooseCustomer(CrmCustomer crmCustomer);

    /**
     * 添加跟进记录
     * @param crmCustomerTraceDTO
     * @return
     */
    int addCrmCustomerTrace(CrmCustomerTraceDTO crmCustomerTraceDTO);

    List<CrmCustomer> getList(CrmCustomer crmCustomer);
}
